<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

function creat_uri($uri = array(), $sub_dir = ''){
    $CI =& get_instance();
    
    if($sub_dir != '') {
        if(isset($uri['dir']) && $uri['dir'] != '') {
        	$uri['dir'] .= ':'.$sub_dir;
        }else {
        	$uri['dir'] = $sub_dir;
        }
    }
    
    return admin_url('video/image/'.$CI->uri->assoc_to_uri($uri));
}

function creat_path($uri, $item){    
    $path = str_replace(':', '/', $uri['dir']).'/'.$item;
    
    return site_url('uploads/'.$path);
}